Welcome![Sign In][Sign Up]
Location:
Search - STC P

Search list

[assembly language闰年计算

Description:

 data segment    ;定义数据段

    infon db 0dh,0ah,'Please input a year: $'
    Y db 0dh,0ah,'This is a leap year! $'
    N db 0dh,0ah,'This is not a leap year! $'
    w dw 0
    buf db 8
        db ?
        db 8 dup(?)
data ends
 
stack segment stack
    db 200 dup(0)
stack ends
 
code segment
          assume ds:data,ss:stack,cs:code
    start:mov ax,data
          mov ds,ax
         
          lea dx,infon ;在屏幕上显示提示信息
          mov ah,9
          int 21h
 
          lea dx,buf    ;从键盘输入年份字符串
          mov ah,10
          int 21h
         
          mov cl, [buf+1]
          lea di,buf+2
          call datacate
          call ifyears
          jc a1
         
          lea dx,n
          mov ah,9
          int 21h
          jmp exit
    a1:   lea dx,y
          mov ah,9
          int 21h
    exit: mov ah,4ch
          int 21h
      
 
 
 datacate proc near;
          push cx;                                                      
          dec cx
          lea si,buf+2
     tt1: inc si
          loop tt1
          ;lea si,cx[di]
          pop cx
    
     
          mov dh,30h
          mov bl,10
          mov ax,1
      l1: push ax
          sub byte ptr [si],dh
          mul byte ptr [si]
          add w,ax
          pop ax
          mul bl
          dec si
          loop l1
          ret
 datacate endp
 
 
   ifyears proc near
           push bx
           push cx
           push dx
           mov ax,w
           mov   cx,ax
           mov dx,0
           mov bx,4
           div bx
           cmp dx,0
           jnz lab1
           mov   ax,cx
           mov bx,100
           div bx
           cmp dx,0
           jnz lab2
           mov ax,cx
           mov bx,400
           div bx
           cmp dx,0
           jz lab2
     lab1: clc
           jmp lab3
     lab2: stc
     lab3: pop dx
           pop cx
           pop bx
           ret
   ifyears endp
code ends
   end start
     




[广告] 2008年最受关注楼盘


Platform: | Size: 10752 | Author: jackdawson0@ | Hits:

[SCMText2

Description: STC 51系列单片机实现PWM,由P1口输出其波形9+-STC 51 Series MCU PWM, the output of its mouth by the P1 waveform 9+
Platform: | Size: 1024 | Author: chen | Hits:

[source in ebook89c52_spi

Description: 实用电路,89c52摸拟SPI输出.但速度不快.-Practical circuit, 89c52 simulation SPI output. But slow.
Platform: | Size: 27648 | Author: 陈耀明 | Hits:

[OtherSTC12C2052AD

Description: 关于STC12C2052系列的中文文档,相当有参考价值,是开发STC系列不可少的参考文档-STC12C2052 series on the Chinese document, there is considerable reference value, the development of STC series indispensable reference documentation
Platform: | Size: 1455104 | Author: sfasdf | Hits:

[SCM51PWM

Description: 使用51单片机定时器T0产生PWM的,方法为交替使用连个定时常数,本软件包含源代码,为计算这两个常数而设计-The use of 51 single-chip PWM timer T0 generated, and methods for the alternate use of even regular constants, the software contains the source code for the calculation of these two constants designed
Platform: | Size: 6144 | Author: dellric | Hits:

[Other Embeded programstc_pwm

Description: 这是关于stc12c系列单片机PWM的事例程序,对学习单片机的东东很有用-This is a series of single-chip PWM on stc12c examples of procedures for learning useful Dongdong SCM
Platform: | Size: 25600 | Author: 李权 | Hits:

[SCMPWM

Description: 转速表采用的是测量编码盘的信号,用STC89C2052单片机进行处理,根据转速输出0-5V电压-Tachometer is used in measuring the signal encoded disk with STC89C2052 single-chip processing, in accordance with speed 0-5V output voltage
Platform: | Size: 1024 | Author: 林必中 | Hits:

[SCM2410sCAN

Description:
Platform: | Size: 44032 | Author: 王志 | Hits:

[SCMSTC12C_PWM

Description: STC12C5410/STC12C5410AD 系列 PWM输出。 采用汇编语言编写,详细注释说明。-PWM output STC12C5410/STC12C5410AD series. Using assembly language to prepare detailed notes.
Platform: | Size: 1024 | Author: twisdsdi | Hits:

[SCMPWM

Description: STC12c5410AD PWM
Platform: | Size: 1024 | Author: | Hits:

[SCMsw

Description: STC12C5410AD的SPI程序 以及AD程序 已经经过硬件调试 可用以及F410的中文版本-STC12C5410AD the SPI procedures, as well as AD after hardware testing procedures have been available, as well as the Chinese version of F410
Platform: | Size: 2394112 | Author: 司威 | Hits:

[SCMLCD

Description: 关键字:LCD液晶显示屏 串行 并行 ST7920 RT12864-Keywords: LCD LCD screen serial parallel ST7920 RT12864
Platform: | Size: 29839360 | Author: 苗瑞瑞 | Hits:

[SCMPWM

Description: STC的PWM应用请大家使用,希望可以帮到大家!-STC
Platform: | Size: 15360 | Author: 发财 | Hits:

[SCMSTC485

Description: STC的485发送应用请大家使用,希望可以帮到大家!-STC 485 Please send the application to use, I hope you can help!
Platform: | Size: 14336 | Author: 发财 | Hits:

[SCMW25X32

Description: 大容量Flash存储器W25X16,W25X32,W25X64读写擦除程序,在SST单片机上测试通过,使用了SST单片机的硬件SPI功能;也可以使用虚拟SPI的方法,在SST和STC单片机上测试通过。-Large-capacity Flash memory W25X16, W25X32, W25X64 erasable read-write procedure, SST Singlechip test is passed, the use of SST Single-chip hardware SPI function SPI can also use the virtual method, in the SST and the STC Single-chip test通过.
Platform: | Size: 2502656 | Author: hawd | Hits:

[Embeded-SCM DevelopSTC12C5201

Description: STC12C5201技术资料,使用STC单片机必备-STC12C5201 technical information necessary to use single-chip STC
Platform: | Size: 2358272 | Author: Richard | Hits:

[Windows DevelopSTC12c5A60s2

Description: 次程序为最新STC的12系列的单片的A/D转换的C程序,一般提供为汇编程序,这个C程序可以通过串口观察得到-Sub-program for the latest STC' s 12 series of single-chip A/D conversion of the C program, are generally provided for the assembler, the C program can be observed through the serial port
Platform: | Size: 28672 | Author: 黎明 | Hits:

[Embeded-SCM DevelopADC_UART

Description: 本程序用STC-ISP Ver 3.0A.PCB的下载编程工具测试通过,相关的A/D转换结果在P1口上显示 -This procedure using STC-ISP Ver 3.0A.PCB download programming tools tested, the related A/D conversion results shown in the P1 port
Platform: | Size: 2048 | Author: cndy | Hits:

[SCMdatasheet-stc-89C52RC

Description: This the 89C52RC datasheet, in chinese, for developping with the device.-This is the 89C52RC datasheet, in chinese, for developping with the device.
Platform: | Size: 1090560 | Author: Whyp | Hits:

[SCMSTC-PCB-PROTEL

Description: stc全系列的单片机封装库,protel 99se格式,可以转成dxp等其他格式。我一直用这个,最近stc官网下不了,所以我共享出来-stc full range of single-chip package library, protel 99se format, can be converted into other formats dxp. I have been using this, the official website recently stc can not, so I shared out
Platform: | Size: 3072 | Author: | Hits:
« 12 »

CodeBus www.codebus.net